import request from '@/utils/request'

export function listhead(query) {
  return request({
    url: '/purchase/head/list',
    method: 'get',
    params: query
  })
}

export function createhead(data) {
  return request({
    url: '/purchase/head/create',
    method: 'post',
    data
  })
}

export function readhead(data) {
  return request({
    url: '/purchase/head/get/' + data.id,
    method: 'get'
  })
}

export function updatehead(data) {
  return request({
    url: '/purchase/head/update',
    method: 'post',
    data
  })
}

export function deletehead(data) {
  return request({
    url: '/purchase/head/delete',
    method: 'post',
    data
  })
}
